package main;

import vectors.Vector;

public class Sort {

	public static Vector sortVector(Vector v) {
		int length = v.getLength();
		for (int i = 0; i < length; i++) {
			int min = i;
			for (int j = i + 1; j < length; j++) {
				if (v.getElement(j) < v.getElement(min)) {
					min = j;
				}
			}
			double tmp = v.getElement(i);
			v.setElement(i, v.getElement(min));
			v.setElement(min, tmp);
		}
		return v;
	}
}
